package domain.extendMappingJoined;


import javax.persistence.*;
import java.util.HashSet;
import java.util.Set;

@Entity
@Table(name = "manager_inf")
public class Manager extends Person{
    private String department;

    @OneToMany(targetEntity = Employee.class,mappedBy = "manager")
    private Set<Employee> employees = new HashSet<>();

    public Manager() {
    }

    public Manager(String name, String department) {
        super(name);
        this.department = department;
    }

    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    public Set<Employee> getEmployees() {
        return employees;
    }

    public void setEmployees(Set<Employee> employees) {
        this.employees = employees;
    }
}
